package com.tydic.mysql2kafka.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

/**
 * @author chenwk
 * @version 1.0.0
 * @ClassName KafkaConsumer
 * @Description kafka消费者
 * @createTime 2019年11月25日 15:19
 */
@Service
public class KafkaConsumer {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    @KafkaListener(topics = "${binlog.kafka-topic}")
    public void onMessage(String message){
        logger.info("KafkaConsumer receive message : {}",message);
    }

}
